<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/WEB-INF/layout/t.xhtml">

	<ui:define name="title">
		<h:outputText value="Scheda Notizia" />
	</ui:define>
	<ui:define name="roles">
		<f:attribute name="roles" value="news" />
	</ui:define>
	<ui:define name="content">
		<h:form>
			<center>
				<p:panel header="Scheda Notizia">

					<h:panelGrid columns="2">
						<h:outputLabel for="titolo" style="font-weight: bolder;"
							value="Titolo: " />
						<h:outputText id="titolo" value="#{newsController.element.title}" />

						<h:outputLabel for="autore" style="font-weight: bolder;"
							value="Autore: " />
						<h:outputText id="autore" value="#{newsController.element.author}"
							width="640px" height="320px"></h:outputText>

						<h:outputLabel for="tipo" style="font-weight: bolder;"
							value="Tipo informazione: " />
						<h:outputText id="tipo"
							value="#{newsController.element.newsType.name}" width="640px"
							height="320px"></h:outputText>

						<h:outputLabel for="anteprima" style="font-weight: bolder;"
							value="Anteprima: " />
						<h:outputText id="anteprima"
							value="#{newsController.element.preview}" />

						<h:outputLabel for="contenuto" style="font-weight: bolder;"
							value="Contenuto: " />
						<h:outputText id="contenuto"
							value="#{newsController.element.content}" escape="false" />
					</h:panelGrid>
				</p:panel>
				<br /> <br />
				<h:panelGrid columns="1">
					<h:commandButton action="#{newsController.modCurrent}"
						value="Modifica" />
				</h:panelGrid>
			</center>
		</h:form>

	</ui:define>
</ui:composition>